package ch6oopexerjavateacher;

import ch6oopexerteacher.Teacher;

public class javaTeacher extends Teacher {
    String lesson;

    public javaTeacher() {
    }


    public javaTeacher(String name, int age, int year, String gender, String lesson) {
        super(name, age, year, gender);
        this.lesson = lesson;
    }


    public void method(){
        System.out.println("熟悉"+lesson);
    }
    public void selfIntroduce(){
        super.selfIntroduce();
        method();
    }
    public void giveLession(){
        System.out.println("java老师使用idea上课");
    }

}
